﻿using System;
using Utils;

namespace Plugins.UserControls
{
	[Serializable]
	public class DateSelectorData : PropertyChangedNotifierCopyable<DateSelectorData>, ICloneable<DateSelectorData>
	{
		#region Attributes

		private bool _useAllDays;
		private DateTime? _startDate;
		private DateTime? _endDate;

		#endregion

		#region Properties

		public bool UseAllDays
		{
			get
			{
				return _useAllDays;
			}
			set
			{
				if (_useAllDays != value)
				{
					_useAllDays = value;
					base.OnPropertyChanged("UseAllDays");
				}
			}
		}

		public DateTime? StartDate
		{
			get
			{
				return _startDate;
			}
			set
			{
				if (_startDate != value)
				{
					_startDate = value;
					base.OnPropertyChanged("StartDate");
				}
			}
		}

		public DateTime? EndDate
		{
			get
			{
				return _endDate;
			}
			set
			{
				if (_endDate != value)
				{
					_endDate = value;
					base.OnPropertyChanged("EndDate");
				}
			}
		}

		#endregion

		#region ICloneable

		public DateSelectorData Clone()
		{
			return (DateSelectorData)this.MemberwiseClone();
		}

		#endregion
    }
}
